package practice1_100;

import java.util.HashMap;
import java.util.Map;

public class Offer3 {
        public int findRepeatNumber(int[] nums) {
            Map<Integer,Integer> map =new HashMap<>();
            for (int i = 0; i < nums.length; i++) {
                if(!map.containsKey(nums[i])) map.put(nums[i],1);
                else return nums[i];
            }
            return 0;
        }
}
